﻿@model List<Occupie.ViewModels.EmployerAllViewModel>

@{
    ViewBag.Title = "Работодатели";
}

<script type="text/x-kendo-tmpl" id="template">
    <a href="/Employer/Profile/?id=#:Id#" class="employer">
        <img src="#:Picture#" alt="#:Name#" />
        <h3>#:Name#</h3>
    <br />
    </a>
</script>

<div class="demo-section-employers">
    <hgroup class="title">
        <h2>@ViewBag.Title</h2>
    </hgroup>
    @{
        for (int i = 0; i < Model.Count; i++)
        {
            Model[i].Picture = Url.Content(Model[i].Picture);
        }
    }

    @(Html.Kendo().ListView<Occupie.ViewModels.EmployerAllViewModel>(Model)
    .Name("listView")
    .TagName("div")
    .ClientTemplateId("template")
    .DataSource(dataSource =>
    {
        dataSource.Read(read => read.Action("ReadEmployers", "Employer"));
        dataSource.PageSize(10);
    })
    .Pageable()
)
</div>
